package com.hjqjl.module_home.ui;

import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;

import com.blankj.utilcode.util.ImageUtils;
import com.hjqjl.module_home.BitmapUtils;
import com.hjqjl.module_home.R;
import com.hjqjl.module_home.databinding.HomeActivityImageBinding;
import com.hjqjl.whapplib.base.BaseActivity;

public class ImageActivity extends BaseActivity<HomeActivityImageBinding> {
    public static void start(Context context) {
        Intent starter = new Intent(context, ImageActivity.class);
        context.startActivity(starter);
    }

    Bitmap mCartoonImage;
    Bitmap mBgImage;

    @Override
    public void initData() {
        setTitle("图片处理");
        mCartoonImage = ImageUtils.getBitmap(R.drawable.home_multiply_cartoon);
        Bitmap mCartoonImage2 = ImageUtils.scale(mCartoonImage, 600, 400);
        mBgImage = ImageUtils.getBitmap(R.drawable.home_multiply_bg);
        Bitmap mBgImage2 = ImageUtils.scale(mBgImage, 600, 600);
        Bitmap bitmap = BitmapUtils.setModeMultiply(mCartoonImage2, mBgImage2);
        pVBinding.homeIvImageMultiplyShow.setImageBitmap(bitmap);
    }
}
